package main

import (
	"fmt"
	"io"
	"time"
)

type CommonArtifact struct {
	title    string
	creators []string
	created  time.Time
}
type Album struct {
	CommonArtifact
}
type Book struct {
	CommonArtifact
}
type Movie struct {
	CommonArtifact
}
type Magazine struct {
	CommonArtifact
}
type Podcast struct {
	CommonArtifact
}
type TVEpisode struct {
	CommonArtifact
}
type Track struct {
	CommonArtifact
}

type Artifact interface {
	Title() string
	Creators() []string
	Created() time.Time
}

type Text interface {
	Pages() int
	Words() string
	Pagesize() int
}
type Audio interface {
	Stream() (io.ReadCloser, error)
	RunningTime() time.Time
	Format() string
}
type Video interface {
	Stream() (io.ReadCloser, error)
	RunningTime() time.Time
	Format() string
	Resolution() (x, y int)
}
type Streamer interface {
	Stream() (io.ReadCloser, error)
	RunningTime() time.Time
	Format() string
}

func (a *CommonArtifact) Title() string {
	return a.title
}

func (a *CommonArtifact) Creators() []string {
	return a.creators
}

func (a *CommonArtifact) Created() time.Time {
	return a.created
}

func main() {
	var a Artifact = &Book{CommonArtifact: CommonArtifact{"c", []string{"A"}, time.Now()}}
	fmt.Println(a.Title())
	fmt.Println(a.Creators())
	fmt.Println(a.Created())
}
